# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Jobs.V4.Model.JobEvent do
  @moduledoc """
  An event issued when a job seeker interacts with the application that implements Cloud Talent Solution.

  ## Attributes

  *   `jobs` (*type:* `list(String.t)`, *default:* `nil`) - Required. The job name(s) associated with this event. For example, if this is an impression event, this field contains the identifiers of all jobs shown to the job seeker. If this was a view event, this field contains the identifier of the viewed job. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for example, "projects/foo/tenants/bar/jobs/baz".
  *   `type` (*type:* `String.t`, *default:* `nil`) - Required. The type of the event (see JobEventType).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :jobs => list(String.t()) | nil,
          :type => String.t() | nil
        }

  field(:jobs, type: :list)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Jobs.V4.Model.JobEvent do
  def decode(value, options) do
    GoogleApi.Jobs.V4.Model.JobEvent.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Jobs.V4.Model.JobEvent do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
